package com.fcscs.cservice.client.common.controller;

import java.util.List;
import java.util.Map;

import com.fcscs.core.gwt.common.AsyncCallbackListener;
import com.fcscs.core.gwt.common.GWTAsyncCaller;
import com.fcscs.cservice.common.CServiceCommonEnums.EditableCategoryEnum;
import com.fcscs.cservice.domain.AuthenticationConfig;
import com.fcscs.cservice.domain.ConstantsLanguageValue;
import com.fcscs.cservice.domain.Country;
import com.fcscs.cservice.domain.DedicatedVideoConfig;
import com.fcscs.cservice.domain.ExpressCheckInConfig;
import com.fcscs.cservice.domain.FieldEditability;
import com.fcscs.cservice.domain.HouseKeepingConfig;
import com.fcscs.cservice.domain.IGuestUserProfileView;
import com.fcscs.cservice.domain.IGuestUserView;
import com.fcscs.cservice.domain.InterfaceConfig;
import com.fcscs.cservice.domain.InterfaceConfiguration;
import com.fcscs.cservice.domain.Language;
import com.fcscs.cservice.domain.Nationality;
import com.fcscs.cservice.domain.PaymentMethod;
import com.fcscs.cservice.domain.State;
import com.fcscs.cservice.domain.Title;
import com.fcscs.cservice.domain.model.CountryView;
import com.fcscs.cservice.domain.model.EditabilityConf;
import com.fcscs.cservice.domain.model.ReservationConfView;
import com.fcscs.cservice.domain.model.StateView;
import com.fcscs.cservice.gwt.client.CServiceCommonService;
import com.fcscs.cservice.gwt.client.CServiceCommonServiceAsync;
import com.fcscs.share.common.ShareEnums.DeviceIntf;
import com.fcscs.share.gwt.client.SharedService;
import com.fcscs.share.gwt.client.SharedServiceAsync;
import com.google.gwt.core.client.GWT;

public class CServiceCommonServiceController extends GWTAsyncCaller {
	private static CServiceCommonServiceController INSTANCE = new CServiceCommonServiceController();
    private CServiceCommonServiceAsync cServiceCommonServiceGWT = GWT.create(CServiceCommonService.class);
	private SharedServiceAsync shareGWT = GWT.create(SharedService.class);
    
    public static CServiceCommonServiceController getINSTANCE(){
    	return INSTANCE;
    } 
    
    private CServiceCommonServiceController(){
    }
    
    public void getCountries(long propId, AsyncCallbackListener<List<CountryView>> callback){
    	cServiceCommonServiceGWT.getCountryViewList(propId, createCallBack(0, callback));
    }
    
    public void getRsvConfView(long propId, AsyncCallbackListener<ReservationConfView> callback){
    	cServiceCommonServiceGWT.getRsvConfView(propId, createCallBack(0, callback));
    }
    
    public void getStates(long countryId, AsyncCallbackListener<List<StateView>> callback){
    	cServiceCommonServiceGWT.getStateViewList(countryId, createCallBack(0, callback));
    }
    
    public void getTitleList(long propId, AsyncCallbackListener<List<Title>> callback){
    	cServiceCommonServiceGWT.getTitleList(propId, createCallBack(0, callback));
    }
    
    public void saveTitle(Title title, AsyncCallbackListener<Title> callback){
    	cServiceCommonServiceGWT.saveTitle(title, createCallBack(0, callback));
    }
    
    public void getPayMethodList(long propId,
    		AsyncCallbackListener<List<PaymentMethod>> callback){
    	cServiceCommonServiceGWT.getPayMethodList(propId, createCallBack(0, callback));
    }
    
    public void savePayMethod(PaymentMethod payMethod,
    		AsyncCallbackListener<PaymentMethod> callback){
    	cServiceCommonServiceGWT.savePayMethod(payMethod, createCallBack(0, callback));
    }
    
    public void getLanguageList(long propId, AsyncCallbackListener<List<Language>> callback){
    	cServiceCommonServiceGWT.getLanguageList(propId, createCallBack(0, callback));
    }
    
    public void saveLanguage(Language language, AsyncCallbackListener<Language> callback){
    	cServiceCommonServiceGWT.saveLanguage(language, createCallBack(0, callback));
    }
    
    public void getNationalityList(long propId,
    		AsyncCallbackListener<List<Nationality>> callback){
    	cServiceCommonServiceGWT.getNationalityList(propId, createCallBack(0, callback));
    }
    
    public void saveNationality(Nationality nationality,
    		AsyncCallbackListener<Nationality> callback){
    	cServiceCommonServiceGWT.saveNationality(nationality, createCallBack(0, callback));
    }
    
    public void getCountryList(long propId, AsyncCallbackListener<List<Country>> callback){
    	cServiceCommonServiceGWT.getCountryList(propId, createCallBack(0, callback));
    }
    
    public void saveCountry(Country country, AsyncCallbackListener<Country> callback){
    	cServiceCommonServiceGWT.saveCountry(country, createCallBack(0, callback));
    }
    
    public void getStateList(long countryId, AsyncCallbackListener<List<State>> callback){
    	cServiceCommonServiceGWT.getStateList(countryId, createCallBack(0, callback));
    }
    
    public void saveState(State state, AsyncCallbackListener<State> callback){
    	cServiceCommonServiceGWT.saveState(state, createCallBack(0, callback));
    }
    
    public void isCountryTaken(long propId, String country, Long id,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.isCountryTaken(propId, country, id, createCallBack(0, callback));
    }
    
    public void isLanguageTaken(long propId, String language, Long id,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.isLanguageTaken(propId, language, id, createCallBack(0, callback));
    }
    
    public void isNationalityTaken(long propId, String nationality, Long id,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.isNationalityTaken(propId, nationality, id, createCallBack(0, callback));
    }
    
    public void isPayMethodTaken(long propId, String method, Long id,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.isPayMethodTaken(propId, method, id, createCallBack(0, callback));
    }
    
    public void isStateTaken(long propId, long countryId, String state, Long id,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.isStateTaken(propId, countryId, state, id, createCallBack(0, callback));
    }
    
    public void isTitleTaken(long propId, String title, Long id,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.isTitleTaken(propId, title, id, createCallBack(0, callback));
    }
    
    public void deleteTitle(Title title, AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.deleteTitle(title, createCallBack(0, callback));
    }
    
    public void deletePayMethod(PaymentMethod method, AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.deletePayMethod(method, createCallBack(0, callback));
    }
    
    public void deleteLanguage(Language language, AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.deleteLanguage(language, createCallBack(0, callback));
    }
    
    public void deleteNationality(Nationality nationality,
    		AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.deleteNationality(nationality, createCallBack(0, callback));
    }
    
    public void deleteCountry(Country country, AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.deleteCountry(country, createCallBack(0, callback));
    }
    
    public void deleteState(State state, AsyncCallbackListener<Boolean> callback){
    	cServiceCommonServiceGWT.deleteState(state, createCallBack(0, callback));
    }
    
    public void getEditabilityConf(long propId, List<EditableCategoryEnum> categories,
    		AsyncCallbackListener<EditabilityConf> callback){
    	cServiceCommonServiceGWT.getEditabilityConf(propId, categories, createCallBack(0, callback));
    }
    
    public void updateFieldEditability(List<FieldEditability> fieldEditList,
    		AsyncCallbackListener<List<FieldEditability>> callback){
    	cServiceCommonServiceGWT.updateFieldEditability(fieldEditList, createCallBack(0, callback));
    }
    
    public void getInterfaceConf(long id, AsyncCallbackListener<InterfaceConfiguration> callback){
    	cServiceCommonServiceGWT.getInterfaceConf(id, createCallBack(0, callback));
    }

    public void saveInterfaceConf(InterfaceConfiguration conf, AsyncCallbackListener<InterfaceConfiguration> callback){
    	cServiceCommonServiceGWT.saveInterfaceConf(conf, createCallBack(0, callback));
    }

    public void getDeviceNumList(DeviceIntf intf, AsyncCallbackListener<List<String>> callback) {
		shareGWT.getDeviceNumList(intf, createCallBack(0,callback));
	}
    
    public void getListIGuestUserView(AsyncCallbackListener<List<IGuestUserView>> callback){
    	cServiceCommonServiceGWT.getListIGuestUserView(createCallBack(0, callback));
    }
 // iGuest Authen
    public void getAuthen(long propId,long orgId,  AsyncCallbackListener<AuthenticationConfig> callback) {
    	cServiceCommonServiceGWT.getAuthen(propId,orgId, createCallBack(0, callback));
    }
    public void SaveAuthen(AuthenticationConfig authen, AsyncCallbackListener<AuthenticationConfig> callback){
    	cServiceCommonServiceGWT.SaveAuthen(authen, createCallBack(0, callback));
    }
 // Delicated Video
    public void getDelicatedVideo(long propId,long orgId,  AsyncCallbackListener<DedicatedVideoConfig> callback) {
    	cServiceCommonServiceGWT.getDelicatedVideo(propId,orgId, createCallBack(0, callback));
    }
    public void saveDelicatedVideo(DedicatedVideoConfig delicatevideo, AsyncCallbackListener<DedicatedVideoConfig> callback){
    	cServiceCommonServiceGWT.saveDelicatedVideo(delicatevideo, createCallBack(0, callback));
    }
//MultiLanguage    
    public void getLanguageMap(AsyncCallbackListener<Map<String, String>> callback){
    	cServiceCommonServiceGWT.getLanguageMap(createCallBack(0, callback));
    }
    
    public void getIGuestUserProfileView(AsyncCallbackListener<IGuestUserProfileView> callback){
    	cServiceCommonServiceGWT.getIGuestUserProfileView(createCallBack(0, callback));
    }


	public void saveExpressCheckInConfig(ExpressCheckInConfig expressCheckIn,
			AsyncCallbackListener<ExpressCheckInConfig> callback) {
		// TODO Auto-generated method stub
		cServiceCommonServiceGWT.saveExpressCheckInConfig(expressCheckIn, createCallBack(0, callback));
	}
	
	public void getExpressCheckInConfig(long id, AsyncCallbackListener<ExpressCheckInConfig> callback){
		cServiceCommonServiceGWT.getExpressCheckInConfig(id, createCallBack(0, callback));
	}
		
	public void saveConstantsLanguageValue(ConstantsLanguageValue constants, AsyncCallbackListener<ConstantsLanguageValue> callback)
	{
		cServiceCommonServiceGWT.saveConstantsLanguageValue(constants, createCallBack(0, callback));
	}
	public void getListConstantsLanguage( long propId,long orgId,String constants,AsyncCallbackListener<List<ConstantsLanguageValue>>callback){
		cServiceCommonServiceGWT.getListConstantsLanguage(propId, orgId, constants, createCallBack(0, callback));
	}

	public void saveHousepeepingConfig(
			HouseKeepingConfig currentHousekeepingConf,
			AsyncCallbackListener<HouseKeepingConfig> callback) {
		// TODO Auto-generated method stub
		cServiceCommonServiceGWT.saveHousepeepingConfig(currentHousekeepingConf, createCallBack(0, callback));
	}

	public void getHousekeepingConfig(long propertyId,
			AsyncCallbackListener<HouseKeepingConfig> callback) {
		// TODO Auto-generated method stub
		cServiceCommonServiceGWT.getHousekeepingConfig(propertyId, createCallBack(0, callback));
	}

	public void getInterfaceConfig(Long propertyId,
			AsyncCallbackListener<InterfaceConfig> callback) {
		// TODO Auto-generated method stub
		cServiceCommonServiceGWT.getInterfaceConfig(propertyId, createCallBack(0, callback));
	}

	public void saveInterfaceConfig(InterfaceConfig currentInterConf,
			AsyncCallbackListener<InterfaceConfig> callback) {
		// TODO Auto-generated method stub
		cServiceCommonServiceGWT.saveInterfaceConfig(currentInterConf, createCallBack(0, callback));
	}
}
